#ifndef USERHELPER_H
#define USERHELPER_H

#include <QObject>
#include <QSize>
#include <QUrl>
#include <QVariantMap>

class UserHelper: public QObject
{
    Q_OBJECT
    Q_DISABLE_COPY( UserHelper )
    Q_PROPERTY(QVariantMap userinfo READ userinfo WRITE setUserinfo RESET resetUserinfo NOTIFY userinfoChanged FINAL)
private:
    UserHelper();
public:
    static UserHelper *instance();
    QVariantMap userinfo() const;
    void setUserinfo(const QVariantMap &newUserinfo);
    void resetUserinfo();
    QString token();

signals:
    void userinfoChanged();

private:
    QVariantMap m_userinfo;

};

#endif // USERHELPER_H
